package com.interview.spring.factoryBeanAndBeanFactory;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * @author: zsg
 * @description:
 * @date: 2019/12/8 11:31
 * @modified:
 */
@Component("indexFactoryBean")
public class IndexFactoryBean implements FactoryBean {

    public void test(){
        System.out.println("IndexFactoryBean");
    }
    @Override
    public Object getObject() throws Exception {
        return new IndexDaoImpl();
    }

    @Override
    public Class<?> getObjectType() {
        return IndexDaoImpl.class;
    }
}
